package link.gpt.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * ebook_entry
 * @author
 */
public class EbookEntry implements Serializable {


   /**
    * 分类实例
    */
   private EbookCategory ebookCategory;

   public EbookCategory getEbookCategory() {
      return ebookCategory;
   }

   public void setEbookCategory(EbookCategory ebookCategory) {
      this.ebookCategory = ebookCategory;
   }


   public EbookEntry() {
   }

   public EbookEntry(Integer id, Integer categoryId, String title, String summary, String uploadUser) {
      this.ebookCategory = ebookCategory;
      this.id = id;
      this.categoryId = categoryId;
      this.title = title;
      this.summary = summary;
      this.uploadUser = uploadUser;
      this.createDate = createDate;
   }

   /**
    * 编号
    */
   private Integer id;

   /**
    * 分类编号
    */
   private Integer categoryId;

   /**
    * 图书名称
    */
   private String title;

   /**
    * 摘要
    */
   private String summary;

   /**
    * 上传人
    */
   private String uploadUser;

   /**
    * 上传时间
    */
   private Date createDate;

   private static final long serialVersionUID = 1L;

   public Integer getId() {
      return id;
   }

   public void setId(Integer id) {
      this.id = id;
   }

   public Integer getCategoryId() {
      return categoryId;
   }

   public void setCategoryId(Integer categoryId) {
      this.categoryId = categoryId;
   }

   public String getTitle() {
      return title;
   }

   public void setTitle(String title) {
      this.title = title;
   }

   public String getSummary() {
      return summary;
   }

   public void setSummary(String summary) {
      this.summary = summary;
   }

   public String getUploadUser() {
      return uploadUser;
   }

   public void setUploadUser(String uploadUser) {
      this.uploadUser = uploadUser;
   }

   public Date getCreateDate() {
      return createDate;
   }

   public void setCreateDate(Date createDate) {
      this.createDate = createDate;
   }

   @Override
   public boolean equals(Object that) {
      if (this == that) {
         return true;
      }
      if (that == null) {
         return false;
      }
      if (getClass() != that.getClass()) {
         return false;
      }
      EbookEntry other = (EbookEntry) that;
      return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
              && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
              && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
              && (this.getSummary() == null ? other.getSummary() == null : this.getSummary().equals(other.getSummary()))
              && (this.getUploadUser() == null ? other.getUploadUser() == null : this.getUploadUser().equals(other.getUploadUser()))
              && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()));
   }

   @Override
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
      result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
      result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
      result = prime * result + ((getSummary() == null) ? 0 : getSummary().hashCode());
      result = prime * result + ((getUploadUser() == null) ? 0 : getUploadUser().hashCode());
      result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
      return result;
   }

   @Override
   public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(getClass().getSimpleName());
      sb.append(" [");
      sb.append("Hash = ").append(hashCode());
      sb.append(", id=").append(id);
      sb.append(", categoryId=").append(categoryId);
      sb.append(", title=").append(title);
      sb.append(", summary=").append(summary);
      sb.append(", uploadUser=").append(uploadUser);
      sb.append(", createDate=").append(createDate);
      sb.append(", serialVersionUID=").append(serialVersionUID);
      sb.append("]");
      return sb.toString();
   }
}